<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const p1 = new Promise(resolve => setTimeout(() => {
            resolve(100)
        }, 3000));
        const p2 = Promise.resolve('hello');
        async function fn() {
            const r = await p1;
            console.log(r);
        }
        fn();
        console.log(1);
        console.log(2);
    </script>
</body>

</html>